﻿using System;
using System.Data;
using System.Text;
using System.Data.SqlClient;
using DBUtility;//请先添加引用
namespace TierApplication
{
    /// <summary>
    /// 类T_OrderReturnFee。
    /// </summary>
    [Serializable]
    public partial class T_OrderReturnFee
    {
        public T_OrderReturnFee()
        { }
        #region Model
        private string _returnfeeid;
        private string _invoiceid;
        private string _orderid;
        private DateTime? _orderdate;
        private DateTime? _returnfeedate;
        private string _orderuserid;
        private string _returnfeeno;
        private string _contractno;
        private string _ordercode;
        private string _ordertype;
        private string _orderstatus;
        private string _depotid;
        private string _audituserid;
        private DateTime? _auditdate;
        private string _auditremark;
        private string _remark;
        private int? _sign = 0;
        private string _returnfeetitle;
        private string _returnfeecontent;
        private decimal? _returnfeemoney = 0M;
        private string _returnfeeremark;
        private DateTime? _createdate = DateTime.Now;
        private string _createuser;
        private string _remark1;
        private string _remark2;
        /// <summary>
        /// 
        /// </summary>
        public string ReturnFeeID
        {
            set { _returnfeeid = value; }
            get { return _returnfeeid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string InvoiceID
        {
            set { _invoiceid = value; }
            get { return _invoiceid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string OrderID
        {
            set { _orderid = value; }
            get { return _orderid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? OrderDate
        {
            set { _orderdate = value; }
            get { return _orderdate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? ReturnFeeDate
        {
            set { _returnfeedate = value; }
            get { return _returnfeedate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string OrderUserID
        {
            set { _orderuserid = value; }
            get { return _orderuserid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ReturnFeeNo
        {
            set { _returnfeeno = value; }
            get { return _returnfeeno; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ContractNo
        {
            set { _contractno = value; }
            get { return _contractno; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string OrderCode
        {
            set { _ordercode = value; }
            get { return _ordercode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string OrderType
        {
            set { _ordertype = value; }
            get { return _ordertype; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string OrderStatus
        {
            set { _orderstatus = value; }
            get { return _orderstatus; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string DepotID
        {
            set { _depotid = value; }
            get { return _depotid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string AuditUserID
        {
            set { _audituserid = value; }
            get { return _audituserid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? AuditDate
        {
            set { _auditdate = value; }
            get { return _auditdate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string AuditRemark
        {
            set { _auditremark = value; }
            get { return _auditremark; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Remark
        {
            set { _remark = value; }
            get { return _remark; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? Sign
        {
            set { _sign = value; }
            get { return _sign; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ReturnFeeTitle
        {
            set { _returnfeetitle = value; }
            get { return _returnfeetitle; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ReturnFeeContent
        {
            set { _returnfeecontent = value; }
            get { return _returnfeecontent; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? ReturnFeeMoney
        {
            set { _returnfeemoney = value; }
            get { return _returnfeemoney; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ReturnFeeRemark
        {
            set { _returnfeeremark = value; }
            get { return _returnfeeremark; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? CreateDate
        {
            set { _createdate = value; }
            get { return _createdate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string CreateUser
        {
            set { _createuser = value; }
            get { return _createuser; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Remark1
        {
            set { _remark1 = value; }
            get { return _remark1; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Remark2
        {
            set { _remark2 = value; }
            get { return _remark2; }
        }
        #endregion Model


        #region  Method

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public T_OrderReturnFee(string ReturnFeeID)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select ReturnFeeID,InvoiceID,OrderID,OrderDate,ReturnFeeDate,OrderUserID,ReturnFeeNo,ContractNo,OrderCode,OrderType,OrderStatus,DepotID,AuditUserID,AuditDate,AuditRemark,Remark,Sign,ReturnFeeTitle,ReturnFeeContent,ReturnFeeMoney,ReturnFeeRemark,CreateDate,CreateUser,Remark1,Remark2 ");
            strSql.Append(" FROM [T_OrderReturnFee] ");
            strSql.Append(" where ReturnFeeID=@ReturnFeeID ");
            SqlParameter[] parameters = {
					new SqlParameter("@ReturnFeeID", SqlDbType.VarChar,-1)};
            parameters[0].Value = ReturnFeeID;

            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["ReturnFeeID"] != null)
                {
                    this.ReturnFeeID = ds.Tables[0].Rows[0]["ReturnFeeID"].ToString();
                }
                if (ds.Tables[0].Rows[0]["InvoiceID"] != null)
                {
                    this.InvoiceID = ds.Tables[0].Rows[0]["InvoiceID"].ToString();
                }
                if (ds.Tables[0].Rows[0]["OrderID"] != null)
                {
                    this.OrderID = ds.Tables[0].Rows[0]["OrderID"].ToString();
                }
                if (ds.Tables[0].Rows[0]["OrderDate"] != null && ds.Tables[0].Rows[0]["OrderDate"].ToString() != "")
                {
                    this.OrderDate = DateTime.Parse(ds.Tables[0].Rows[0]["OrderDate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ReturnFeeDate"] != null && ds.Tables[0].Rows[0]["ReturnFeeDate"].ToString() != "")
                {
                    this.ReturnFeeDate = DateTime.Parse(ds.Tables[0].Rows[0]["ReturnFeeDate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["OrderUserID"] != null)
                {
                    this.OrderUserID = ds.Tables[0].Rows[0]["OrderUserID"].ToString();
                }
                if (ds.Tables[0].Rows[0]["ReturnFeeNo"] != null)
                {
                    this.ReturnFeeNo = ds.Tables[0].Rows[0]["ReturnFeeNo"].ToString();
                }
                if (ds.Tables[0].Rows[0]["ContractNo"] != null)
                {
                    this.ContractNo = ds.Tables[0].Rows[0]["ContractNo"].ToString();
                }
                if (ds.Tables[0].Rows[0]["OrderCode"] != null)
                {
                    this.OrderCode = ds.Tables[0].Rows[0]["OrderCode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["OrderType"] != null)
                {
                    this.OrderType = ds.Tables[0].Rows[0]["OrderType"].ToString();
                }
                if (ds.Tables[0].Rows[0]["OrderStatus"] != null)
                {
                    this.OrderStatus = ds.Tables[0].Rows[0]["OrderStatus"].ToString();
                }
                if (ds.Tables[0].Rows[0]["DepotID"] != null)
                {
                    this.DepotID = ds.Tables[0].Rows[0]["DepotID"].ToString();
                }
                if (ds.Tables[0].Rows[0]["AuditUserID"] != null)
                {
                    this.AuditUserID = ds.Tables[0].Rows[0]["AuditUserID"].ToString();
                }
                if (ds.Tables[0].Rows[0]["AuditDate"] != null && ds.Tables[0].Rows[0]["AuditDate"].ToString() != "")
                {
                    this.AuditDate = DateTime.Parse(ds.Tables[0].Rows[0]["AuditDate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["AuditRemark"] != null)
                {
                    this.AuditRemark = ds.Tables[0].Rows[0]["AuditRemark"].ToString();
                }
                if (ds.Tables[0].Rows[0]["Remark"] != null)
                {
                    this.Remark = ds.Tables[0].Rows[0]["Remark"].ToString();
                }
                if (ds.Tables[0].Rows[0]["Sign"] != null && ds.Tables[0].Rows[0]["Sign"].ToString() != "")
                {
                    this.Sign = int.Parse(ds.Tables[0].Rows[0]["Sign"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ReturnFeeTitle"] != null)
                {
                    this.ReturnFeeTitle = ds.Tables[0].Rows[0]["ReturnFeeTitle"].ToString();
                }
                if (ds.Tables[0].Rows[0]["ReturnFeeContent"] != null)
                {
                    this.ReturnFeeContent = ds.Tables[0].Rows[0]["ReturnFeeContent"].ToString();
                }
                if (ds.Tables[0].Rows[0]["ReturnFeeMoney"] != null && ds.Tables[0].Rows[0]["ReturnFeeMoney"].ToString() != "")
                {
                    this.ReturnFeeMoney = decimal.Parse(ds.Tables[0].Rows[0]["ReturnFeeMoney"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ReturnFeeRemark"] != null)
                {
                    this.ReturnFeeRemark = ds.Tables[0].Rows[0]["ReturnFeeRemark"].ToString();
                }
                if (ds.Tables[0].Rows[0]["CreateDate"] != null && ds.Tables[0].Rows[0]["CreateDate"].ToString() != "")
                {
                    this.CreateDate = DateTime.Parse(ds.Tables[0].Rows[0]["CreateDate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["CreateUser"] != null)
                {
                    this.CreateUser = ds.Tables[0].Rows[0]["CreateUser"].ToString();
                }
                if (ds.Tables[0].Rows[0]["Remark1"] != null)
                {
                    this.Remark1 = ds.Tables[0].Rows[0]["Remark1"].ToString();
                }
                if (ds.Tables[0].Rows[0]["Remark2"] != null)
                {
                    this.Remark2 = ds.Tables[0].Rows[0]["Remark2"].ToString();
                }
            }
        }

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(string ReturnFeeID)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select count(1) from [T_OrderReturnFee]");
            strSql.Append(" where ReturnFeeID=@ReturnFeeID ");

            SqlParameter[] parameters = {
					new SqlParameter("@ReturnFeeID", SqlDbType.VarChar,-1)};
            parameters[0].Value = ReturnFeeID;

            return DbHelperSQL.Exists(strSql.ToString(), parameters);
        }


        /// <summary>
        /// 增加一条数据
        /// </summary>
        public void Add()
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into [T_OrderReturnFee] (");
            strSql.Append("ReturnFeeID,InvoiceID,OrderID,OrderDate,ReturnFeeDate,OrderUserID,ReturnFeeNo,ContractNo,OrderCode,OrderType,OrderStatus,DepotID,AuditUserID,AuditDate,AuditRemark,Remark,Sign,ReturnFeeTitle,ReturnFeeContent,ReturnFeeMoney,ReturnFeeRemark,CreateDate,CreateUser,Remark1,Remark2)");
            strSql.Append(" values (");
            strSql.Append("@ReturnFeeID,@InvoiceID,@OrderID,@OrderDate,@ReturnFeeDate,@OrderUserID,@ReturnFeeNo,@ContractNo,@OrderCode,@OrderType,@OrderStatus,@DepotID,@AuditUserID,@AuditDate,@AuditRemark,@Remark,@Sign,@ReturnFeeTitle,@ReturnFeeContent,@ReturnFeeMoney,@ReturnFeeRemark,@CreateDate,@CreateUser,@Remark1,@Remark2)");
            SqlParameter[] parameters = {
					new SqlParameter("@ReturnFeeID", SqlDbType.VarChar,10),
					new SqlParameter("@InvoiceID", SqlDbType.VarChar,10),
					new SqlParameter("@OrderID", SqlDbType.VarChar,10),
					new SqlParameter("@OrderDate", SqlDbType.DateTime),
					new SqlParameter("@ReturnFeeDate", SqlDbType.DateTime),
					new SqlParameter("@OrderUserID", SqlDbType.VarChar,10),
					new SqlParameter("@ReturnFeeNo", SqlDbType.VarChar,50),
					new SqlParameter("@ContractNo", SqlDbType.VarChar,50),
					new SqlParameter("@OrderCode", SqlDbType.VarChar,50),
					new SqlParameter("@OrderType", SqlDbType.VarChar,10),
					new SqlParameter("@OrderStatus", SqlDbType.VarChar,10),
					new SqlParameter("@DepotID", SqlDbType.VarChar,10),
					new SqlParameter("@AuditUserID", SqlDbType.VarChar,10),
					new SqlParameter("@AuditDate", SqlDbType.DateTime),
					new SqlParameter("@AuditRemark", SqlDbType.VarChar,250),
					new SqlParameter("@Remark", SqlDbType.VarChar,200),
					new SqlParameter("@Sign", SqlDbType.Int,4),
					new SqlParameter("@ReturnFeeTitle", SqlDbType.VarChar,100),
					new SqlParameter("@ReturnFeeContent", SqlDbType.VarChar,250),
					new SqlParameter("@ReturnFeeMoney", SqlDbType.Decimal,9),
					new SqlParameter("@ReturnFeeRemark", SqlDbType.VarChar,250),
					new SqlParameter("@CreateDate", SqlDbType.DateTime),
					new SqlParameter("@CreateUser", SqlDbType.VarChar,20),
					new SqlParameter("@Remark1", SqlDbType.VarChar,50),
					new SqlParameter("@Remark2", SqlDbType.VarChar,50)};
            parameters[0].Value = ReturnFeeID;
            parameters[1].Value = InvoiceID;
            parameters[2].Value = OrderID;
            parameters[3].Value = OrderDate;
            parameters[4].Value = ReturnFeeDate;
            parameters[5].Value = OrderUserID;
            parameters[6].Value = ReturnFeeNo;
            parameters[7].Value = ContractNo;
            parameters[8].Value = OrderCode;
            parameters[9].Value = OrderType;
            parameters[10].Value = OrderStatus;
            parameters[11].Value = DepotID;
            parameters[12].Value = AuditUserID;
            parameters[13].Value = AuditDate;
            parameters[14].Value = AuditRemark;
            parameters[15].Value = Remark;
            parameters[16].Value = Sign;
            parameters[17].Value = ReturnFeeTitle;
            parameters[18].Value = ReturnFeeContent;
            parameters[19].Value = ReturnFeeMoney;
            parameters[20].Value = ReturnFeeRemark;
            parameters[21].Value = CreateDate;
            parameters[22].Value = CreateUser;
            parameters[23].Value = Remark1;
            parameters[24].Value = Remark2;

            DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
        }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update()
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("update [T_OrderReturnFee] set ");
            strSql.Append("InvoiceID=@InvoiceID,");
            strSql.Append("OrderID=@OrderID,");
            strSql.Append("OrderDate=@OrderDate,");
            strSql.Append("ReturnFeeDate=@ReturnFeeDate,");
            strSql.Append("OrderUserID=@OrderUserID,");
            strSql.Append("ReturnFeeNo=@ReturnFeeNo,");
            strSql.Append("ContractNo=@ContractNo,");
            strSql.Append("OrderCode=@OrderCode,");
            strSql.Append("OrderType=@OrderType,");
            strSql.Append("OrderStatus=@OrderStatus,");
            strSql.Append("DepotID=@DepotID,");
            strSql.Append("AuditUserID=@AuditUserID,");
            strSql.Append("AuditDate=@AuditDate,");
            strSql.Append("AuditRemark=@AuditRemark,");
            strSql.Append("Remark=@Remark,");
            strSql.Append("Sign=@Sign,");
            strSql.Append("ReturnFeeTitle=@ReturnFeeTitle,");
            strSql.Append("ReturnFeeContent=@ReturnFeeContent,");
            strSql.Append("ReturnFeeMoney=@ReturnFeeMoney,");
            strSql.Append("ReturnFeeRemark=@ReturnFeeRemark,");
            strSql.Append("CreateDate=@CreateDate,");
            strSql.Append("CreateUser=@CreateUser,");
            strSql.Append("Remark1=@Remark1,");
            strSql.Append("Remark2=@Remark2");
            strSql.Append(" where ReturnFeeID=@ReturnFeeID ");
            SqlParameter[] parameters = {
					new SqlParameter("@InvoiceID", SqlDbType.VarChar,10),
					new SqlParameter("@OrderID", SqlDbType.VarChar,10),
					new SqlParameter("@OrderDate", SqlDbType.DateTime),
					new SqlParameter("@ReturnFeeDate", SqlDbType.DateTime),
					new SqlParameter("@OrderUserID", SqlDbType.VarChar,10),
					new SqlParameter("@ReturnFeeNo", SqlDbType.VarChar,50),
					new SqlParameter("@ContractNo", SqlDbType.VarChar,50),
					new SqlParameter("@OrderCode", SqlDbType.VarChar,50),
					new SqlParameter("@OrderType", SqlDbType.VarChar,10),
					new SqlParameter("@OrderStatus", SqlDbType.VarChar,10),
					new SqlParameter("@DepotID", SqlDbType.VarChar,10),
					new SqlParameter("@AuditUserID", SqlDbType.VarChar,10),
					new SqlParameter("@AuditDate", SqlDbType.DateTime),
					new SqlParameter("@AuditRemark", SqlDbType.VarChar,250),
					new SqlParameter("@Remark", SqlDbType.VarChar,200),
					new SqlParameter("@Sign", SqlDbType.Int,4),
					new SqlParameter("@ReturnFeeTitle", SqlDbType.VarChar,100),
					new SqlParameter("@ReturnFeeContent", SqlDbType.VarChar,250),
					new SqlParameter("@ReturnFeeMoney", SqlDbType.Decimal,9),
					new SqlParameter("@ReturnFeeRemark", SqlDbType.VarChar,250),
					new SqlParameter("@CreateDate", SqlDbType.DateTime),
					new SqlParameter("@CreateUser", SqlDbType.VarChar,20),
					new SqlParameter("@Remark1", SqlDbType.VarChar,50),
					new SqlParameter("@Remark2", SqlDbType.VarChar,50),
					new SqlParameter("@ReturnFeeID", SqlDbType.VarChar,10)};
            parameters[0].Value = InvoiceID;
            parameters[1].Value = OrderID;
            parameters[2].Value = OrderDate;
            parameters[3].Value = ReturnFeeDate;
            parameters[4].Value = OrderUserID;
            parameters[5].Value = ReturnFeeNo;
            parameters[6].Value = ContractNo;
            parameters[7].Value = OrderCode;
            parameters[8].Value = OrderType;
            parameters[9].Value = OrderStatus;
            parameters[10].Value = DepotID;
            parameters[11].Value = AuditUserID;
            parameters[12].Value = AuditDate;
            parameters[13].Value = AuditRemark;
            parameters[14].Value = Remark;
            parameters[15].Value = Sign;
            parameters[16].Value = ReturnFeeTitle;
            parameters[17].Value = ReturnFeeContent;
            parameters[18].Value = ReturnFeeMoney;
            parameters[19].Value = ReturnFeeRemark;
            parameters[20].Value = CreateDate;
            parameters[21].Value = CreateUser;
            parameters[22].Value = Remark1;
            parameters[23].Value = Remark2;
            parameters[24].Value = ReturnFeeID;

            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(string ReturnFeeID)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("delete from [T_OrderReturnFee] ");
            strSql.Append(" where ReturnFeeID=@ReturnFeeID ");
            SqlParameter[] parameters = {
					new SqlParameter("@ReturnFeeID", SqlDbType.VarChar,-1)};
            parameters[0].Value = ReturnFeeID;

            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }


        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public void GetModel(string ReturnFeeID)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select ReturnFeeID,InvoiceID,OrderID,OrderDate,ReturnFeeDate,OrderUserID,ReturnFeeNo,ContractNo,OrderCode,OrderType,OrderStatus,DepotID,AuditUserID,AuditDate,AuditRemark,Remark,Sign,ReturnFeeTitle,ReturnFeeContent,ReturnFeeMoney,ReturnFeeRemark,CreateDate,CreateUser,Remark1,Remark2 ");
            strSql.Append(" FROM [T_OrderReturnFee] ");
            strSql.Append(" where ReturnFeeID=@ReturnFeeID ");
            SqlParameter[] parameters = {
					new SqlParameter("@ReturnFeeID", SqlDbType.VarChar,-1)};
            parameters[0].Value = ReturnFeeID;

            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["ReturnFeeID"] != null)
                {
                    this.ReturnFeeID = ds.Tables[0].Rows[0]["ReturnFeeID"].ToString();
                }
                if (ds.Tables[0].Rows[0]["InvoiceID"] != null)
                {
                    this.InvoiceID = ds.Tables[0].Rows[0]["InvoiceID"].ToString();
                }
                if (ds.Tables[0].Rows[0]["OrderID"] != null)
                {
                    this.OrderID = ds.Tables[0].Rows[0]["OrderID"].ToString();
                }
                if (ds.Tables[0].Rows[0]["OrderDate"] != null && ds.Tables[0].Rows[0]["OrderDate"].ToString() != "")
                {
                    this.OrderDate = DateTime.Parse(ds.Tables[0].Rows[0]["OrderDate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ReturnFeeDate"] != null && ds.Tables[0].Rows[0]["ReturnFeeDate"].ToString() != "")
                {
                    this.ReturnFeeDate = DateTime.Parse(ds.Tables[0].Rows[0]["ReturnFeeDate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["OrderUserID"] != null)
                {
                    this.OrderUserID = ds.Tables[0].Rows[0]["OrderUserID"].ToString();
                }
                if (ds.Tables[0].Rows[0]["ReturnFeeNo"] != null)
                {
                    this.ReturnFeeNo = ds.Tables[0].Rows[0]["ReturnFeeNo"].ToString();
                }
                if (ds.Tables[0].Rows[0]["ContractNo"] != null)
                {
                    this.ContractNo = ds.Tables[0].Rows[0]["ContractNo"].ToString();
                }
                if (ds.Tables[0].Rows[0]["OrderCode"] != null)
                {
                    this.OrderCode = ds.Tables[0].Rows[0]["OrderCode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["OrderType"] != null)
                {
                    this.OrderType = ds.Tables[0].Rows[0]["OrderType"].ToString();
                }
                if (ds.Tables[0].Rows[0]["OrderStatus"] != null)
                {
                    this.OrderStatus = ds.Tables[0].Rows[0]["OrderStatus"].ToString();
                }
                if (ds.Tables[0].Rows[0]["DepotID"] != null)
                {
                    this.DepotID = ds.Tables[0].Rows[0]["DepotID"].ToString();
                }
                if (ds.Tables[0].Rows[0]["AuditUserID"] != null)
                {
                    this.AuditUserID = ds.Tables[0].Rows[0]["AuditUserID"].ToString();
                }
                if (ds.Tables[0].Rows[0]["AuditDate"] != null && ds.Tables[0].Rows[0]["AuditDate"].ToString() != "")
                {
                    this.AuditDate = DateTime.Parse(ds.Tables[0].Rows[0]["AuditDate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["AuditRemark"] != null)
                {
                    this.AuditRemark = ds.Tables[0].Rows[0]["AuditRemark"].ToString();
                }
                if (ds.Tables[0].Rows[0]["Remark"] != null)
                {
                    this.Remark = ds.Tables[0].Rows[0]["Remark"].ToString();
                }
                if (ds.Tables[0].Rows[0]["Sign"] != null && ds.Tables[0].Rows[0]["Sign"].ToString() != "")
                {
                    this.Sign = int.Parse(ds.Tables[0].Rows[0]["Sign"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ReturnFeeTitle"] != null)
                {
                    this.ReturnFeeTitle = ds.Tables[0].Rows[0]["ReturnFeeTitle"].ToString();
                }
                if (ds.Tables[0].Rows[0]["ReturnFeeContent"] != null)
                {
                    this.ReturnFeeContent = ds.Tables[0].Rows[0]["ReturnFeeContent"].ToString();
                }
                if (ds.Tables[0].Rows[0]["ReturnFeeMoney"] != null && ds.Tables[0].Rows[0]["ReturnFeeMoney"].ToString() != "")
                {
                    this.ReturnFeeMoney = decimal.Parse(ds.Tables[0].Rows[0]["ReturnFeeMoney"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ReturnFeeRemark"] != null)
                {
                    this.ReturnFeeRemark = ds.Tables[0].Rows[0]["ReturnFeeRemark"].ToString();
                }
                if (ds.Tables[0].Rows[0]["CreateDate"] != null && ds.Tables[0].Rows[0]["CreateDate"].ToString() != "")
                {
                    this.CreateDate = DateTime.Parse(ds.Tables[0].Rows[0]["CreateDate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["CreateUser"] != null)
                {
                    this.CreateUser = ds.Tables[0].Rows[0]["CreateUser"].ToString();
                }
                if (ds.Tables[0].Rows[0]["Remark1"] != null)
                {
                    this.Remark1 = ds.Tables[0].Rows[0]["Remark1"].ToString();
                }
                if (ds.Tables[0].Rows[0]["Remark2"] != null)
                {
                    this.Remark2 = ds.Tables[0].Rows[0]["Remark2"].ToString();
                }
            }
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select * ");
            strSql.Append(" FROM [T_OrderReturnFee] ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return DbHelperSQL.Query(strSql.ToString());
        }

        #endregion  Method
    }
}

